Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change implementation owner to address(1) from address(0) #44

Closed
wants to merge 1 commit into from

Conversation

stevieraykatz
Copy link
Contributor

@stevieraykatz stevieraykatz commented Apr 1, 2024

This Code4rena finding correctly points out that the implementation being owned by address(0) might expose attack surface area. Though we cannot find a way to exploit this currently, it's trivial to change the implementations owner to address(1) to completely eliminate this vector.

@stevieraykatz
Copy link
Contributor Author

Closing out -- SignatureCheckerLib.isValidSignatureNow appropriately returns false for address(0):

                    // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise.
                    if iszero(or(iszero(returndatasize()), xor(signer, mload(t)))) {
                        isValid := 1
                        mstore(0x60, 0) // Restore the zero slot.
                        mstore(0x40, m) // Restore the free memory pointer.
                        break
                    }

Unit test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant